import Vue from 'vue'
import Cookies from 'js-cookie'
import 'normalize.css/normalize.css'
import Element from 'element-ui'
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
import dict from './components/Dict' // 数据字典
import checkPer from '@/utils/permission' // 权限指令
import permission from './components/Permission'
import './assets/styles/index.scss'
import VueHighlightJS from 'vue-highlightjs' // 代码高亮
import 'highlight.js/styles/atom-one-dark.css'
import App from './App'
import store from './store'
import router from './router/routers'
import './assets/icons' // icon
import './router/index' // permission control
import 'echarts-gl'
import './utils/directive.js'// el-select不可点关闭
import './utils/inputToText'
import wlAddress from 'wl-address'
import 'wl-address/lib/wl-address.css'
import Tinymce from '@/components/tinymce/index.vue'
import EditorView from '@/components/EditorView'
import VueDragResize from 'vue-drag-resize'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
import './haiSumUi'
import '@/assets/icons/iconfont.js'

Vue.component('tinymce', Tinymce)
Vue.component('editorview', EditorView)
Vue.component('vue-drag-resize', VueDragResize)
Vue.use(VXETable)
Vue.use(wlAddress)
Vue.use(checkPer)
Vue.use(VueHighlightJS)
Vue.use(mavonEditor)
Vue.use(permission)
Vue.use(dict)
Vue.use(Element, {
  size: Cookies.get('size') || 'small' // set element-ui default size
})
Vue.config.productionTip = false
Vue.prototype.$desktop = { win: null }

/* if (process.env.NODE_ENV === 'development') {
  const { mockXHR } = require('../mock')
  mockXHR()
}*/
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
